<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../../tpl/head.jsp"%>
<link rel="stylesheet" href="statics/css/secondarytitle.css">
<link rel="stylesheet" href="statics/css/other/tpl/newupgeneral.css">
<div class="layui-fluid">
    <div class="layui-card">
        <div class="header">
            <img class="img " src="statics/images/titheader.svg">
            <span>添加，修改验货质检</span>
        </div>
        <div class="layui-card-body">
            <form class="layui-form" action="" lay-filter="editor-form" id="editor-form">
                <div class="layui-form-item zdy-item-css">
                    <div class="layui-inline">
                        <label class="layui-form-label xb_required">验货单号</label>
                        <div class="layui-input-inline">
                            <input type="text" id="oddNumber" name="oddNumber" autocomplete="off" class="layui-input" lay-verify="required">
                            <input type="hidden" name="boxStatus" id="boxStatus">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label xb_required">验货类型</label>
                        <div class="layui-input-inline">
                            <select lay-search name="inspectType" id="inspectType" lay-filter="inspectType" lay-verify="required">
                                <option value=""></option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item zdy-item-css">
                    <div class="layui-inline">
                        <label class="layui-form-label xb_required">验货日期</label>
                        <div class="layui-input-inline">
                            <input type="text" name="inspectTime" lay-verify="required|date" autocomplete="off" class="layui-input starttime" placeholder="年 - 月 - 日">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label ">验货地址</label>
                        <div class="layui-input-inline">
                            <input type="text" name="address" id="address" autocomplete="off" class="layui-input" >
                        </div>
                    </div>
                </div>
                <div class="layui-form-item zdy-item-css">
                    <div class="layui-inline">
                        <label class="layui-form-label xb_required">要求期限</label>
                        <div class="layui-input-inline">
                            <input type="text" name="timeLimit" lay-verify="required|date" autocomplete="off" class="layui-input timeLimit" placeholder="年 - 月 - 日">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label xb_required">验货费用</label>
                        <div class="layui-input-inline">
                            <input type="text" name="cost" autocomplete="off" class="layui-input" lay-verify="required|number">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item zdy-item-css">
                    <div class="layui-inline">
                        <label class="layui-form-label xb_required">验货阶段</label>
                        <div class="layui-input-inline">
<%--                            <input type="text" id="stage" name="stage" class="layui-input" style="position:absolute;z-index:2;" autocomplete="off">--%>
                            <select type="text" name="stage" id="stageSelect" lay-filter="stage_filter" lay-verify="required" autocomplete="off" class="layui-select" lay-search>
                                <option value=""></option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">业务员</label>
                        <div class="layui-input-inline">
                            <select name="inspector" id="inspector" lay-search>
                                <option value=""></option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item zdy-item-css">
                    <div class="layui-inline">
                        <label class="layui-form-label">验货公司</label>
                        <div class="layui-input-inline">
                            <select lay-search name="company" id="company" lay-filter="company_filter">
                                <option value=""></option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">出运计划单号/采购单号</label>
                        <div class="layui-input-inline">
                            <input type="text" name="loadPlanNo" id="loadPlanNo" autocomplete="off" class="layui-input" >
                        </div>
                    </div>
                </div>
                <div class="layui-form-item zdy-item-css">
                    <div class="layui-inline">
                        <label class="layui-form-label">制单公司</label>
                        <div class="layui-input-inline">
                            <select lay-search name="complaintUnit" id="complaintUnit" lay-filter="makingcompany">
                                <option value=""></option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">操作员</label>
                        <div class="layui-input-inline">
                            <select name="executor" id="executor" lay-search>
                                <option value=""></option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">备注</label>
                    <div class="layui-input-block">
                        <textarea name="remark" placeholder="请输入内容" class="layui-textarea"></textarea>
                    </div>
                </div>
                <div class="layui-row">
                    <div class="layui-col-xs12">
                        <div class="layui-tab layui-tab-card">
                            <ul class="layui-tab-title">
                                <li class="layui-this">验货质检明细</li>
                                <li class="">附件</li>
                                <li class="">日志</li>
                            </ul>
                            <div class="layui-tab-content">
                                <div  class="layui-tab-item  layui-show">
                                    <table class="layui-table" id="storageproducts" lay-filter="storageproductstable"></table>
                                </div>
                                <div class="layui-tab-item">
                                    <table class="layui-table" id="attachment" lay-filter="attachmenttable"></table>
                                </div>
                                <div class="layui-tab-item"><table class="layui-table" id="otherwarehouselog" lay-filter="logtable"></table></div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="padding text-right">
                    <button type="button" class="layui-btn" lay-submit="" lay-filter="form-element">立即提交</button>
                </div>
            </form>
        </div>
    </div>
</div>

<div class="layui-upload" id="attachmentupload" style="display: none;padding: 10px">
    <a type="button" class="layui-btn layui-btn-normal" id="uploadfile">选择文件</a>
    <div class="layui-upload-list">
        <table class="layui-table">
            <thead>
            <tr><th>文件名</th>
                <th>大小</th>
                <th>状态</th>
                <th>操作</th>
            </tr></thead>
            <tbody id="uploadlist"></tbody>
        </table>
    </div>
    <a type="button" class="layui-btn" id="testListAction">开始上传</a>
</div>
<script type="text/html" id="imgTpl">
    <img src="{{d.productimg}}" data-id="{{d.id}}" class="btn_productimg" onerror="this.src='statics/images/layui-logo.jpg';this.onerror=null" alt="产品图片" style="max-width:70px;max-height: 28px;">
</script>

<script type="text/html" id="colourScript">
    <select id="colour_{{d.tempId}}" class="colourSelect" lay-filter="colourSelect_filter">
        <option value="{{d.colour}}">{{d.colour==undefined?"":d.colour}}</option>
        <option value=""></option>
    </select>
</script>
<script type="text/html" id="unitScript">
    <select id="unit_{{d.tempId}}" class="unitSelect" lay-filter="unitSelect_filter">
        <option value="{{d.unit}}">{{d.unit==undefined?"":d.unit}}</option>
        <option value=""></option>
    </select>
</script>
<script type="text/html" id="complaintUnitScript">
    <select id="complaintUnit_{{d.tempId}}" class="complaintUnitSelect"  lay-filter="complaintUnitSelect_filter" lay-search>
        <option value="{{d.supplier}}">{{d.supplier==undefined?"":d.supplier}}</option>
        <option value=""></option>
    </select>
</script>

<script type="text/html" id="storageproductstoolbar">
    <a class="layui-btn" data-type="getCheckData" lay-event="importshipmentplan">导入出运计划</a>
    <a class="layui-btn" data-type="getCheckData" lay-event="importpurchasedocuments">导入采购单据</a>
    <a class="layui-btn layui-btn-danger" lay-event="del">删除</a>
</script>
<script type="text/html" id="storageproductseditor">
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>

<script type="text/html" id="attachmenttoolbar">
    <a class="layui-btn" data-type="getCheckData" lay-event="uploadfile">上传</a>
</script>
<script type="text/html" id="attachmenteditor">
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="download">下载</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>
<%@ include file="../../tpl/foot.jsp"%>
<script src="statics/js/other/tpl/newupinspection.js"></script>